Skip to content

Commit

Permalink
aria2 强制IPv4
Browse files Browse the repository at this point in the history
  • Loading branch information
zh99998 committed Dec 11, 2016
1 parent ce76a12 commit 6ae00cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions app/download.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
*/
import {Injectable, NgZone, EventEmitter} from "@angular/core";
import {Http} from "@angular/http";
import {Observable} from "rxjs/Observable";
import {App} from "./app";
import {Observer} from "rxjs";
import Timer = NodeJS.Timer;
import {error} from "util";
import Timer = NodeJS.Timer;
const Logger = {
"error": (message: string) => {
console.error("DownloadService: ", message);
Expand Down Expand Up @@ -97,7 +94,8 @@ export class DownloadStatus {

@Injectable()
export class DownloadService {
aria2 = new Aria2();
// 强制指定IPv4,接到过一个反馈无法监听v6的。默认的host值是localhost,会连v6。
aria2 = new Aria2({host: '127.0.0.1'});
open = this.aria2.open();
updateEmitter = new EventEmitter<void>();

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mycard",
"version": "3.0.2",
"version": "3.0.3",
"description": "mycard",
"keywords": [],
"author": "zh99998 <[email protected]>",
Expand Down

0 comments on commit 6ae00cd

Please sign in to comment.