{"action":"created","comment":{"url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/comments/169038393","pull_request_review_id":97499504,"id":169038393,"diff_hunk":"@@ -0,0 +1,171 @@\n+/* eslint-env mocha */\n+'use strict'\n+\n+const chai = require('chai')\n+const dirtyChai = require('dirty-chai')\n+const expect = chai.expect\n+chai.use(dirtyChai)\n+const nativeUTP = require('utp-native')\n+const pull = require('pull-stream')\n+const multiaddr = require('multiaddr')\n+\n+const UTP = require('../src')\n+const isCI = process.env.CI\n+\n+describe('listen', () => {\n+  let utp\n+\n+  function ma (port) {\n+    const base = '/ip4/127.0.0.1/udp/'\n+    return multiaddr(`${base}${port}/utp`)\n+  }\n+\n+  beforeEach(() => {\n+    utp = new UTP()\n+  })\n+\n+  it('close listener with connections, through timeout', function (done) {\n+    this.timeout(20 * 1000)\n+\n+    const listener = utp.createListener((conn) => {\n+      pull(conn, conn)\n+    })\n+\n+    listener.on('connection', () => {\n+      // Testing\n+      console.log('incomming connection')\n+    })\n+\n+    const addr = ma(12000)\n+    const connectOptions = addr.toOptions()\n+\n+    listener.listen(addr, () => {\n+      const socket1 = nativeUTP.connect(connectOptions.port, connectOptions.host)\n+      const socket2 = nativeUTP.connect(connectOptions.port, connectOptions.host)\n+\n+      socket1.write('Some data that is never handled')\n+      socket1.end()\n+\n+      // TODO Unfortunately utp has no notion of gracious socket closing\n+      // This feature needs to be shimmed on top to make it a proper libp2p\n+      // transport","path":"test/listen-dial.spec.js","position":51,"original_position":51,"commit_id":"7b3f08e3dd8e0635afa1de0ce944b8d4bc00d5bb","original_commit_id":"7b3f08e3dd8e0635afa1de0ce944b8d4bc00d5bb","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"body":"**This continues to be the crux to support utp**. libp2p currently expect gracious connection closing to be supported. We either remove this requirement or add a shim to libp2p-utp.","created_at":"2018-02-19T10:39:38Z","updated_at":"2018-02-19T10:39:38Z","html_url":"https://github.com/libp2p/js-libp2p-utp/pull/74#discussion_r169038393","pull_request_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/comments/169038393"},"html":{"href":"https://github.com/libp2p/js-libp2p-utp/pull/74#discussion_r169038393"},"pull_request":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74","id":167610272,"html_url":"https://github.com/libp2p/js-libp2p-utp/pull/74","diff_url":"https://github.com/libp2p/js-libp2p-utp/pull/74.diff","patch_url":"https://github.com/libp2p/js-libp2p-utp/pull/74.patch","issue_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/74","number":74,"state":"open","locked":false,"title":"Revamp - Update libp2p-utp to follow latest interface-connection and interface-transport","user":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"body":"> WIP","created_at":"2018-02-07T06:42:52Z","updated_at":"2018-02-19T10:39:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4057d96bff7809a96476d4d745d5bd0611ac82a4","assignee":{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false},"assignees":[{"login":"diasdavid","id":1211152,"avatar_url":"https://avatars0.githubusercontent.com/u/1211152?v=4","gravatar_id":"","url":"https://api.github.com/users/diasdavid","html_url":"https://github.com/diasdavid","followers_url":"https://api.github.com/users/diasdavid/followers","following_url":"https://api.github.com/users/diasdavid/following{/other_user}","gists_url":"https://api.github.com/users/diasdavid/gists{/gist_id}","starred_url":"https://api.github.com/users/diasdavid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasdavid/subscriptions","organizations_url":"https://api.github.com/users/diasdavid/orgs","repos_url":"https://api.github.com/users/diasdavid/repos","events_url":"https://api.github.com/users/diasdavid/events{/privacy}","received_events_url":"https://api.github.com/users/diasdavid/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":419592656,"url":"https://api.github.com/repos/libp2p/js-libp2p-utp/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74/commits","review_comments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74/comments","review_comment_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/74/comments","statuses_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/statuses/7b3f08e3dd8e0635afa1de0ce944b8d4bc00d5bb","head":{"label":"libp2p:revamp","ref":"revamp","sha":"7b3f08e3dd8e0635afa1de0ce944b8d4bc00d5bb","user":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":42765474,"name":"js-libp2p-utp","full_name":"libp2p/js-libp2p-utp","owner":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/js-libp2p-utp","description":"uTP module libp2p uses. Implements the interface-transport spec","fork":false,"url":"https://api.github.com/repos/libp2p/js-libp2p-utp","forks_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/forks","keys_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/teams","hooks_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/hooks","issue_events_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/events","assignees_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/tags","blobs_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/languages","stargazers_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/stargazers","contributors_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/contributors","subscribers_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/subscribers","subscription_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/subscription","commits_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/merges","archive_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/downloads","issues_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/deployments","created_at":"2015-09-19T08:19:45Z","updated_at":"2017-09-06T14:59:28Z","pushed_at":"2018-02-19T10:37:21Z","git_url":"git://github.com/libp2p/js-libp2p-utp.git","ssh_url":"git@github.com:libp2p/js-libp2p-utp.git","clone_url":"https://github.com/libp2p/js-libp2p-utp.git","svn_url":"https://github.com/libp2p/js-libp2p-utp","homepage":"https://libp2p.io","size":26,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":2,"watchers":4,"default_branch":"master"}},"base":{"label":"libp2p:master","ref":"master","sha":"aba3988b62a313e5acb742b2c602246ba6f06f55","user":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"repo":{"id":42765474,"name":"js-libp2p-utp","full_name":"libp2p/js-libp2p-utp","owner":{"login":"libp2p","id":14838238,"avatar_url":"https://avatars3.githubusercontent.com/u/14838238?v=4","gravatar_id":"","url":"https://api.github.com/users/libp2p","html_url":"https://github.com/libp2p","followers_url":"https://api.github.com/users/libp2p/followers","following_url":"https://api.github.com/users/libp2p/following{/other_user}","gists_url":"https://api.github.com/users/libp2p/gists{/gist_id}","starred_url":"https://api.github.com/users/libp2p/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/libp2p/subscriptions","organizations_url":"https://api.github.com/users/libp2p/orgs","repos_url":"https://api.github.com/users/libp2p/repos","events_url":"https://api.github.com/users/libp2p/events{/privacy}","received_events_url":"https://api.github.com/users/libp2p/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/libp2p/js-libp2p-utp","description":"uTP module libp2p uses. Implements the interface-transport spec","fork":false,"url":"https://api.github.com/repos/libp2p/js-libp2p-utp","forks_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/forks","keys_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/teams","hooks_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/hooks","issue_events_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/events{/number}","events_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/events","assignees_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/assignees{/user}","branches_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/branches{/branch}","tags_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/tags","blobs_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/refs{/sha}","trees_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/statuses/{sha}","languages_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/languages","stargazers_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/stargazers","contributors_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/contributors","subscribers_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/subscribers","subscription_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/subscription","commits_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/commits{/sha}","git_commits_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/git/commits{/sha}","comments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/comments{/number}","issue_comment_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/comments{/number}","contents_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/contents/{+path}","compare_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/merges","archive_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/downloads","issues_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues{/number}","pulls_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls{/number}","milestones_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/milestones{/number}","notifications_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/labels{/name}","releases_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/releases{/id}","deployments_url":"https://api.github.com/repos/libp2p/js-libp2p-utp/deployments","created_at":"2015-09-19T08:19:45Z","updated_at":"2017-09-06T14:59:28Z","pushed_at":"2018-02-19T10:37:21Z","git_url":"git://github.com/libp2p/js-libp2p-utp.git","ssh_url":"git@github.com:libp2p/js-libp2p-utp.git","clone_url":"https://github.com/libp2p/js-libp2p-utp.git","svn_url":"https://github.com/libp2p/js-libp2p-utp","homepage":"https://libp2p.io","size":26,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":4,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74"},"html":{"href":"https://github.com/libp2p/js-libp2p-utp/pull/74"},"issue":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/74"},"comments":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/libp2p/js-libp2p-utp/statuses/7b3f08e3dd8e0635afa1de0ce944b8d4bc00d5bb"}},"author_association":"OWNER"}}
{"actor":{"display_login":"diasdavid"}}