Chris Rhodes
8bd3f75441
Merge pull request #227 from jonas747/retry
...
Retry on 502's
2016-09-27 21:19:25 -07:00
jonas747
ebb910f3ac
Set default MaxRestRetries to 3
2016-09-27 18:25:40 +02:00
Bruce Marriner
43778dc54b
Bump version to 0.14.0-dev
2016-07-19 07:44:38 -05:00
Bruce Marriner
11fa9dc906
Bump Version to 0.13.0
2016-07-18 17:12:48 -05:00
Bruce Marriner
9dc51d1c49
Only Shard when ShardCount > 1
...
Also cleaned up identify sending so there's now a function that handles
it instead of duplicate code. Renamed handshake* structs to identify*
structs to make naming match up.
2016-06-14 13:45:38 -05:00
andrei
835a23a89d
Implement guild sharding
2016-06-13 15:34:40 -07:00
Bruce Marriner
7ed2a289bc
Fix possible mutex deadlock in handle()
...
Also added some logging.
2016-05-28 13:51:17 -05:00
Bruce Marriner
a9da8a5daf
Cleanup, Logging, Finished Resumed code.
2016-04-30 21:40:13 -05:00
Bruce Marriner
f6de2b2c98
gateway, voice, & logging improvements
...
We now store teh sessionID of the gateway connection for later use. We
are now caching the gateway url and will use it until unable to connect
to that gateway. We're not longer smashing the VoiceConnections map
during reconnects which was causing Voice problems. Slight change to
log output format.
2016-04-28 21:15:32 -05:00
Bruce Marriner
33f2fa8d81
Bump version to v0.13.0-alpha
2016-04-12 12:35:34 -05:00
Bruce Marriner
12b010078c
Bump version to v0.12.0
2016-04-12 12:28:19 -05:00
Bruce Marriner
1a672823a2
Lint and Cleanup
2016-04-11 18:54:19 -05:00
Chris Rhodes
45e01b20c9
Fix ordering of the OnReady event and Session being updated.
2016-04-01 18:06:20 -07:00
Bruce Marriner
a40bf8952c
Removed onEvent handler
...
With the recent change to the OnEvent event now always executing
insted of only on error we don't want this printing out every
single event. A different way to handle unknown events will be
added in the wsapi.go code.
2016-03-21 17:54:04 -05:00
Bruce Marriner
cd065fa61a
Revert "Removed onEvent handler"
...
This reverts commit 974ed749e1
.
Deleted the wrong function...
2016-03-21 17:53:15 -05:00
Bruce Marriner
974ed749e1
Removed onEvent handler
...
With the recent change to the OnEvent event now always executing
insted of only on error we don't want this printing out every
single event. A different way to handle unknown events will be
added in the wsapi.go code.
2016-03-21 17:47:22 -05:00
Chris Rhodes
584b06aae5
Support VoiceSpeakingUpdates on VoiceConnection.
2016-03-18 10:50:25 -07:00
Bruce Marriner
44d4667463
Bump to v0.12.0-alpha
2016-02-20 20:59:40 -06:00
Bruce Marriner
cadf36c775
Bump to v0.11.0
2016-02-20 20:53:56 -06:00
Chris Rhodes
457b03f66e
Fix deadlock because I'm dumb.
2016-02-19 23:00:41 -08:00
Chris Rhodes
c291988335
Bring back the Lock as it's technically correct.
2016-02-19 22:32:15 -08:00
Chris Rhodes
79247272ff
Handler updates, no backwards incompatible API changes.
...
AddHandler now returns a func that can remove the handler.
The handlers map is now guarded by its own mutex.
Moved eventMap to events.go for readability.
Improved documentation.
2016-02-19 22:28:21 -08:00
Chris Rhodes
32f8c03270
Fix a Lock instead of RLock in initialize.
2016-02-19 11:25:46 -08:00
Chris Rhodes
d22b7ffc90
Clean up mutexes around s.handlers so they exist only in discord.go
2016-02-17 23:17:31 -08:00
Bruce Marriner
aebfb09719
Baby Linting.
2016-02-15 21:50:41 -06:00
Chris Rhodes
b083ce00c7
Un-expose handlers. Clean up Session struct.
2016-02-14 21:58:29 -08:00
Chris Rhodes
88335b6f54
Small performance improvement. Added tests.
2016-02-14 19:01:45 -08:00
Chris Rhodes
6fa99712ef
Finish converting large switch statement into a map of functions.
2016-02-14 18:48:37 -08:00
Chris Rhodes
8ffaa85b0b
Thread safety and more events.
2016-02-14 13:41:56 -08:00
Chris Rhodes
fb6ae92555
Add basic support for mapped event handlers.
2016-02-14 13:17:20 -08:00
Bruce Marriner
f917d83f6e
Linting.
2016-01-27 23:39:56 -06:00
Bruce Marriner
9a63e50e22
Bump dev to v0.11.0-alpha
2016-01-27 13:31:14 -06:00
Bruce Marriner
fd42d568ec
Bump version to v0.10.0
2016-01-27 13:27:21 -06:00
Bruce Marriner
94b6199051
ShouldReconnectOnError and Compress are defaulted to true with New()
2016-01-24 13:21:32 -06:00
Chris Rhodes
bf5ca4d690
Fix comment.
2016-01-21 10:59:30 -08:00
Chris Rhodes
8b39278c3e
Get rid of Listen.
2016-01-21 10:58:13 -08:00
Chris Rhodes
c4869d7a43
Remove handshake.
2016-01-21 09:19:20 -08:00
Chris Rhodes
cd55a59ff9
Refactor open/close logic. Support OnConnect and OnDisconnect.
2016-01-20 22:47:34 -08:00
Chris Rhodes
1d9f97e283
Update New to allow an auth token to be specified.
2016-01-17 14:17:51 -08:00
Bruce Marriner
daa230a3c1
Bump dev version to 0.10.0-alpha
2016-01-12 08:31:00 -06:00
Bruce Marriner
e1bfc285a0
Bump version to 0.9.0
2016-01-12 08:29:44 -06:00
Bruce Marriner
2469147d8a
Even better checking that we don't close nil/closed chans.
2016-01-11 14:33:01 -06:00
Bruce Marriner
61b3b8122c
Only close chans if they are open, closes #80
2016-01-11 13:23:11 -06:00
Bruce Marriner
b5e45827fd
Better error checking for New() and Gateway() funcs, closes #75
2016-01-10 19:01:34 -06:00
Bruce Marriner
301fb980d3
Updated copyright year, cleaned up some comments.
2016-01-07 13:50:44 -06:00
Bruce Marriner
d737b91b77
Bump version to v0.9.0-alpha
2016-01-06 16:43:06 -06:00
Bruce Marriner
ad7b7603c6
Bump version for v0.8.0
2016-01-06 16:36:34 -06:00
Bruce Marriner
1ae278b8c0
Modify session close function to do a better job
2016-01-04 13:13:10 -06:00
Chris Rhodes
9ba6d5b7c1
Make state tracking optional.
2016-01-02 12:01:03 -08:00
Chris Rhodes
4e23e5fc35
Implement state tracking.
...
Currently maintains a list of Guilds (Members/Channels) and PrivateChannels.
2016-01-01 22:47:19 -08:00