Commit Graph
236 Commits
Author SHA1 Message Date
xtaci 8edaea72f5 fix a test 2018-10-01 11:16:18 +08:00
xtaci 8cc526d020 fix travis build version 2018-10-01 11:10:15 +08:00
xtaci 23098c5322 upd framesize to 32768 to fix crash to the overflow of uint16 2018-10-01 10:54:41 +08:00
xtaci 9bcf9cb852 adjust default frame size 2018-09-28 20:19:29 +08:00
xtaci b993df6776 simplify header handling 2018-09-28 19:40:24 +08:00
xtaciandGitHub e28719eede Merge pull request #27 from longzhiri/master
fix bug: read 0 bytes from a stream will block forever
v1.0.7
2018-01-04 17:41:28 +08:00
zero d502b06712 fix bug: read 0 bytes from a stream will block forever 2018-01-04 17:07:39 +08:00
xtaci c3e18246ff remove an unnecessary condition 2017-12-16 17:30:04 +08:00
xtaciandGitHub c898867f4f Merge pull request #26 from artyom/master
Fixes of issues discovered by code analysis tool
2017-12-13 18:37:12 +08:00
Artyom Pervukhin 5eec685c3d Remove no more used import in tests
Profiles can be generated directly by the go test command when run with
-*profile flags.
2017-12-13 13:05:05 +03:00
Artyom Pervukhin c600108e14 Don't leak net.Listener in testing helper getTCPConnectionPair 2017-12-13 13:03:11 +03:00
Artyom Pervukhin 545966cdfb Get rid of hard-coded ports in tests
Dynamically allocate ports for test listeners to avoid possible
collisions with local services. Set up and tear down listener for each
test.
2017-12-13 13:00:07 +03:00
Artyom Pervukhin d9d7e13dec Fix TestServerEcho
Do not call testing.T.Fatal from inside extra goroutine. Documentation
for testing.T https://golang.org/pkg/testing/#T states that Fatal method
should only be called from the main goroutine running test:

> A test ends when its Test function returns or calls any of the methods
> FailNow, Fatal, Fatalf, SkipNow, Skip, or Skipf. Those methods, as well as
> the Parallel method, must be called only from the goroutine running the Test
> function.
>
> The other reporting methods, such as the variations of Log and Error, may be
> called simultaneously from multiple goroutines.

Change t.Fatal call with t.Error call.

While here, also simplify goroutine body to be have less indentation levels and
be just a function returning error while using idiomatic defers to close
things.
2017-12-13 12:19:02 +03:00
Artyom Pervukhin d4fb677d96 Simplify condition in tests
Condition

	if session.IsClosed() != true

can be reduced to

	if !session.IsClosed()
2017-12-13 12:01:59 +03:00
Artyom Pervukhin 99d8597e59 Replace d.Sub(time.Now()) with time.Until(d) 2017-12-13 12:00:10 +03:00
xtaci ebec7ef257 adjust read after close behavior https://github.com/xtaci/smux/issues/23 v1.0.6 2017-07-01 21:47:59 +08:00
xtaci 2de5471dfc use mutex instead of atomic for accuracy 2017-04-22 11:45:03 +08:00
xtaci b19bc4137c add a flag for goAway 2017-04-22 11:22:36 +08:00
xtaci 9d687f7d77 handle stream id overflow 2017-04-22 11:05:49 +08:00
xtaci 0f6b9aaeca update tests 2017-04-05 10:19:56 +08:00
xtaciandGitHub a74b5eac0f Update README.md 2017-03-28 12:36:49 +08:00
xtaciandGitHub 57febe8f7e Update README.md 2017-03-28 11:02:11 +08:00
xtaciandGitHub cfd75252c8 Update README.md 2017-03-28 11:01:51 +08:00
xtaciandGitHub 415a8a3ae0 Update README.md 2017-03-28 11:01:15 +08:00
xtaci a1a5df8f92 simplify returnToken v1.0.5 2017-03-22 20:12:24 +08:00
xtaci e183f89624 use notify chan instead of sync.Cond 2017-03-21 13:42:08 +08:00
xtaci 1e5d8c0c13 prealloc slice 2017-03-21 13:42:08 +08:00
xtaciandGitHub bfc89bc3f7 Merge pull request #14 from rogers0/PR/fix_license
Update LICENSE
2017-03-07 17:58:47 +08:00
Roger Shimizu 5d020f06aa Update LICENSE
Make license consistent with golang-github-xtaci-kcp project
2017-03-07 18:51:53 +09:00
xtaci 949ec4dc3f comment on cmdFIN 2017-02-16 15:00:03 +08:00
xtaci cceb67beeb rename cmdRST->cmdFIN to clear up misunderstanding 2017-02-16 14:47:34 +08:00
xtaciandGitHub d1bdf08128 Update README.md 2017-01-12 14:52:49 +08:00
xtaciandGitHub d157180863 Add files via upload 2017-01-12 14:51:53 +08:00
xtaci 42fea0a26c update comments 2017-01-12 14:21:19 +08:00
xtaci e21a67b2f6 remove an unused variable 2017-01-12 14:10:18 +08:00
xtaci 5976bce5b6 remove 2 unnecessary locks 2017-01-12 11:01:07 +08:00
xtaciandGitHub a8fd5fb864 Merge pull request #9 from zhuyie/master
Add Stream.ID
2016-12-16 13:30:10 +08:00
zhuyie 6dd5c5cee8 Add Stream.ID 2016-12-16 11:31:45 +08:00
xtaciandGitHub 427dd804ce Merge pull request #8 from getlantern/master
Fixed deadlock on concurrent closing
v1.0.4
2016-11-29 23:03:00 +08:00
Ox Cart f28ad86390 Fixed deadlock on concurrent closing 2016-11-29 07:28:40 -06:00
xtaci b4a6fb87c6 add a test 2016-11-15 13:43:03 +08:00
xtaciandGitHub 61f5ae8edd Merge pull request #7 from AudriusButkevicius/addrs
Add {Local,Remote}Addr
2016-11-12 18:17:54 +08:00
xtaciandGitHub faf9830239 Merge pull request #5 from AudriusButkevicius/master
Add WriteDeadline
2016-11-12 18:05:07 +08:00
Audrius Butkevicius 7368f64338 Add {Local,Remote}Addr 2016-11-12 07:30:32 +00:00
Audrius Butkevicius 8510e3505d Add WriteDeadline 2016-11-12 07:25:04 +00:00
xtaci 60c611f2ff return io.EOF when cmdRST arrives 2016-11-08 22:17:32 +08:00
xtaci ee8b5b54eb 64bit atomic operations are not guaranteed on 32-bit cpu, replace with
atomic.Value
2016-11-01 22:42:55 +08:00
xtaciandGitHub 2ce5f9997b Merge pull request #4 from getlantern/master
Added ability to set read deadline
2016-11-01 20:58:59 +08:00
Ox Cart f46f1e9066 Added ability to set read deadline 2016-11-01 07:52:27 -05:00
xtaci 9d1cf796b3 optimize returnTokens 2016-10-27 11:43:32 +08:00