2
0
mirror of https://github.com/soheilhy/cmux.git synced 2024-09-19 10:35:47 +08:00

Merge pull request #6 from emosbaugh/flag_parse_in_library

rely on project to call flag.Parse rather than when used as library
This commit is contained in:
Soheil Hassas Yeganeh 2016-02-20 13:50:53 -05:00
commit 345ba38c5f

View File

@ -1,7 +1,6 @@
package cmux
import (
"flag"
"fmt"
"io"
"net"
@ -40,10 +39,6 @@ var (
// New instantiates a new connection multiplexer.
func New(l net.Listener) CMux {
if !flag.Parsed() {
flag.Parse()
}
return &cMux{
root: l,
bufLen: 1024,